
<div class="widget bluesky">
    <div class="widget-title">
        <h4><i class="icon-envelope"></i> Inbox</h4>
        <span class="tools">
            <a href="javascript:;" class="icon-chevron-down"></a>
            <!--a href="javascript:;" class="icon-remove"></a-->
        </span>
    </div>
    <div class="widget-body">
        <?php
//        die(var_dump($model->inboxEmails));
        $this->widget('bootstrap.widgets.TbGridView', array(
            'id' => 'inbox-grid',
            'type' => 'striped bordered hover advance',
            'dataProvider' => InboxReciveMail::model()->search($model->id),
            'columns' => array(
                array(
                    'value' => '($data["count"]>1)?$data["contac_id"]." (".$data["count"].")":$data["contac_id"]',
                    'type' => 'raw',
                    'header' => 'Contacto'
                ),
                array(
                    'value' => '$data["subject"]',
                    'type' => 'raw',
                    'header' => 'Asunto'
                ),
                array(
                    'value' => '$data["c_archive"]>0?"<i class=\"icon-paper-clip\"></i>":""',
                    'type' => 'raw',
                    'header' => ''
                ),
                array(
                    'value' => '"<p class=\"text-right\">".Util::FormatDateGamil($data["create_time"])."</p>"',
                    'type' => 'raw',
                    'header' => 'Fecha'
                ),
                array(
                    'class' => 'CButtonColumn',
                    'template' => '',
                    'buttons' => array(
                        'view' => array(
                            'label' => '<button class="btn btn-success"><i class="icon-eye-open"></i></button>',
                            'options' => array('title' => 'Ver'),
                            'imageUrl' => false,
                            'url' => '$data->id',
                            'click' => 'function() {js:viewModal("nosey/default/respuestasFormulario/id/"+$(this).attr("href"),function(){}); return false;}',
                        ),
                    ),
                    'htmlOptions' => array(
                        'width' => '80'
                    )
                ),
            ),
        ));
        ?>
    </div>
</div>